<?php

namespace common\models\active;

use common\models\BaseModel;

/**
 * Desc 促销活动模型
 */
class ActivePromotionModel extends BaseModel
{

    /** @var int 1 状态: 启用 */
    const STATE_ENABLE = 1;

    /** @var int 1 状态: 禁用 */
    const STATE_DISABLE = 2;

    // 状态
    public static $state = [
        self::STATE_ENABLE => '启用',
        self::STATE_DISABLE => '禁用',
    ];

    //折扣
    const ZHEKOU = 1;
    //满减
    const MANJIAN = 2;
    //满件折
    const MANJIANZHE = 3;
    //满件减
    const MANJIANJIAN = 4;
    //一口价
    const YIKOUJIA = 5;
    //每满减
    const MEIMANJIAN = 6;

    /**
     * 活动类型
     */
    public static $type = [
        self::ZHEKOU => '折扣',
        self::MANJIAN => '满减',
        self::MANJIANZHE => '满件折',
        self::MANJIANJIAN => '满件减',
        self::YIKOUJIA => '一口价',
        //        self::MEIMANJIAN => '每满减'
    ];
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%active_promotion}}';
    }
}
